<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<title>P-crm系统登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/crmt/Public/css/bootstrap.min.css" rel="stylesheet">
<script src="/crmt/Public/js/jquery-1.11.1.min.js"></script>
<script src="/crmt/Public/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
<style type="text/css">
body {
	background: url(/crmt/Public/images/loginbg/loginbg_01.jpg) no-repeat
		center  fixed; background-size:100% 100%;
}
.mess{
	 display:none;
}
.container {
	padding-top: 120px;  
}
.panel{
	background: rgba(255,255,255,0.4); 
}
</style>
<script type="text/javascript">
	$(function() {
		choose_bg();
		validate();
		$("#captcha_img").click(function(){
			changeCode();
		})
	});
	function validate(){
		var validateMess = null;
		validateMess = '<?php echo ($validateMess); ?>';
		if(validateMess == null ||validateMess == ''||validateMess == '非法数据对象！'){
			$(".mess").css('display', 'none');
		}else{
			$(".mess").css('display', 'block');
		}
	}
	function choose_bg() {
		var bg = Math.floor(Math.random() * 9 + 1);
		$('body').css('background-image',
				'url(/crmt/Public/images/loginbg/loginbg_0' + bg + '.jpg)');
	}
	function changeCode(){
		$("#captcha_img").attr("src", "<?php echo U('Index/verify');?>");
	}
</script>
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="col-xs-6 col-xs-offset-3">
				<div  class="alert alert-danger alert-dismissible mess">
					<button type="button" class="close" data-dismiss="alert">
						<span>&times;</span>
					</button>
					<?php echo ($validateMess); ?>
				</div>			
				<div class="panel panel-primary">
					<div class="panel-heading">
						<div class="panel-lilte">
							<span class="glyphicon glyphicon-th-large">
								<b>登录CRM系统</b>
							</span>
						</div>
					</div>
					<div class="panel-body">
						<form class="form-horizontal" method="post" >
							<div class="form-group">
								<label for="j_username" class="control-label col-xs-3">登录名:</label>
								<div class="col-xs-7">
								<!-- required="required"可表单前台验证非空 -->
									<input id="j_username" class="form-control" 
										placeholder="登录名" name="username" />
								</div>
							</div>
							<div class="form-group">
								<label for="j_password" class="control-label col-xs-3">密&nbsp;&nbsp;&nbsp;码:</label>
								<div class="col-xs-7">
									<input id="j_password" class="form-control" type="password"
										 placeholder="密码" name="password" />
								</div>
							</div>
							<div class="form-group">
								<label for="j_captcha" class="control-label col-xs-3">验证码:</label>
								<div class="col-xs-7">
									<input id="j_captcha" class="form-control" type="text"
									 placeholder="验证码" name="captcha" />
										<br/>
									<img id="captcha_img" title="点击更换"
										src="<?php echo U('Index/verify');?>"/>
								</div>
							</div>
							<div class="form-group">
								<button id="login_ok"
									class="btn btn-primary col-xs-3  col-xs-offset-3" type="submit">
									登录</button>
								<button type="reset" 
								class="btn btn-default col-xs-3 col-xs-offset-1">
								重置
								</button>
							</div>
						</form>
					</div>
					<div class="panel-fool">
						<a href=""  class="col-xs-5 col-xs-offset-2">
							XXXXXXX网络科技
							</a> 电话：000-000-000 
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>